from django.contrib import admin
from forum import models

# Register your models here.
class UserTypeAdmin(admin.ModelAdmin):
    list_display = ('display',)
    
class AdminAdmin(admin.ModelAdmin):
    list_display = ('username', 'password', 'email', 'user_type',)

class ChatAdmin(admin.ModelAdmin):
    list_display = ('content', 'user', 'create_date')

class NewsTypeAdmin(admin.ModelAdmin):
    list_display = ('display',)

class NewsAdmin(admin.ModelAdmin):
    list_display = ('title', 'summary', 'url', 'favor_count', 'reply_count', 'news_type', 'user', 'create_date')

class ReplyAdmin(admin.ModelAdmin):
    list_display = ('content', 'user', 'create_date',)
    
admin.site.register(models.UserType, UserTypeAdmin)
admin.site.register(models.Admin, AdminAdmin)
admin.site.register(models.Chat, ChatAdmin)
admin.site.register(models.NewsType, NewsTypeAdmin)
admin.site.register(models.News, NewsAdmin)
admin.site.register(models.Reply, ReplyAdmin)
